// 主题相关store
import { defineStore } from 'pinia';
import { ThemeInfo } from '@/utils/type';

export const useThemeStore = defineStore('theme', {
    state: () => {
        return {
            themeInfo: '.light' as ThemeInfo | '.light', // 主题信息
        }
    },
    actions: {
        // 设置主题状态
        setThemeInfo(themeInfo: boolean) {
            this.themeInfo = themeInfo;
        },
    },
    getters: {},
    // 配置持久化
    persist: {
        paths: ['themeInfo'],// 指定需要持久化的状态
    }
}
);